package com.dc.spike.mapper.entity;

import java.util.Date;

/**
 * @author: KEYD
 * @Date: 2020/1/19 21:05
 * @Desc: 秒杀实体类  商品库存
 */
public class SeckillEntity {

    /**
     * 库存id
     */
    private Long seckillId;
    /**
     * 商品名称
     */
    private String name;

    /**
     * 库存数量
     */
    private Long inventory;

    /**
     * 开启时间
     */
    private Date startTime;

    /**
     * 结束时间
     */
    private Date endTime;

    /**
     * 创建时间
     */
    private Date createTime;

    /**
     * 秒杀抢购 乐观锁的版本限制
     */
    private Long version;

    @Override
    public String toString() {
        return "SeckillEntity{" +
                "seckillId=" + seckillId +
                ", name='" + name + '\'' +
                ", inventory=" + inventory +
                ", startTime=" + startTime +
                ", endTime=" + endTime +
                ", createTime=" + createTime +
                ", version=" + version +
                '}';
    }

    public Long getSeckillId() {
        return seckillId;
    }

    public void setSeckillId(Long seckillId) {
        this.seckillId = seckillId;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public Long getInventory() {
        return inventory;
    }

    public void setInventory(Long inventory) {
        this.inventory = inventory;
    }

    public Date getStartTime() {
        return startTime;
    }

    public void setStartTime(Date startTime) {
        this.startTime = startTime;
    }

    public Date getEndTime() {
        return endTime;
    }

    public void setEndTime(Date endTime) {
        this.endTime = endTime;
    }

    public Date getCreateTime() {
        return createTime;
    }

    public void setCreateTime(Date createTime) {
        this.createTime = createTime;
    }

    public Long getVersion() {
        return version;
    }

    public void setVersion(Long version) {
        this.version = version;
    }
}
